import React from 'react';
import './index.sass';

export default class NavBar extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div className="crm-nav-bar-header">
        <div
          className="crm-nav-bar-header-left"
          onClick={() => {
            this.props.leftClick && this.props.leftClick();
          }}
        >
          {this.props.leftContent || '返回'}
        </div>
        <div className="crm-nav-bar-header-center">{this.props.title}</div>
        <div className="crm-nav-bar-header-right">
          {this.props.rightButton && this.props.rightButton.map(item => item)}
        </div>
      </div>
    );
  }
}
